package online.lmds.sdmanage.main.device.entity;

import online.lmds.sdmanage.common.entity.BaseEntity;

import java.util.Date;

/**
 * Created by Brighten Ma on 2017/4/26.
 */
public class Device  extends BaseEntity{


    //状态未知
    public static final int STATUS_UNKNOW = 1000;

    //开
    public static final int STATUS_ON= 1;

    //关
    public static final int STATUS_OFF = 0;

    //离线
    public static final int STATUS_OFF_LINE = 2;

    //可连接
    public static final int STATUS_CAN_CONNECT = 3;



    public static final Integer TYPE_ANDRPOD = 1;
    public static final Integer TYPE_YEELIGHT_COLOR = 2;
    public static final Integer TYPE_OTHERS = 3;

    private String macAddr; //mac地址
    private Integer status;  //状态
    private Integer type;    //设备类型
    private Integer id;
    private String uid;  //设备唯一标识
    private String name;  //设备名称
    private Integer userId;
    private String ip;    //ip地址
    private Integer port;   //端口
    private Date lastConnectTime;  //最后在线时间
    private String typeName;
    private String info;
    private Integer infoId;


    public Device() {
    }

    public Device(DeviceLog deviceLog){
        this.uid = deviceLog.getUid();
        this.userId = deviceLog.getUserId();
        this.status = deviceLog.getStatus();
        this.info = deviceLog.getInfo();
    }



    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }
    public String getMacAddr() {
        return macAddr;
    }

    public void setMacAddr(String macAddr) {
        this.macAddr = macAddr;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public Date getLastConnectTime() {
        return lastConnectTime;
    }

    public void setLastConnectTime(Date lastConnectTime) {
        this.lastConnectTime = lastConnectTime;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public Integer getInfoId() {
        return infoId;
    }

    public void setInfoId(Integer infoId) {
        this.infoId = infoId;
    }
}
